
import javax.sql.DataSource;

import service.AdminService;
import service.impl.AdminServiceImpl;
import utils.DataSourceHelper;
import utils.TranscationProxy;

public class Main {

	public static void main(String[] args) {
		try{
			String url = "jdbc:mysql://127.0.0.1:3306/test?autoReconnectForPools=true&useUnicode=true&characterEncoding=utf8";
			DataSource dataSource = DataSourceHelper.getDataSource(url);
			
			AdminService adminService = (AdminService)TranscationProxy.getTranscationProxy(AdminServiceImpl.class, dataSource);
			adminService.add();
		}
		catch(Exception e){
			e.printStackTrace();
		}
	}

}
